<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>带有滑动菜单指示器的纯 CSS 导航选项卡</title>
  <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css'>
  <link rel="stylesheet" href="style.css">
</head>

<body>
  <div class="tabs">
    <!-- 单选 -->
    <input type="radio" id="home" name="tabsMenu" />
    <input type="radio" id="profile" name="tabsMenu" />
    <input type="radio" id="likes" name="tabsMenu" />
    <input type="radio" id="settings" name="tabsMenu" />
    <input type="radio" id="notifications" name="tabsMenu" />

    <!-- 图标 -->
    <div class="buttons">
      <label for="home">
        <i class="fa-solid fa-house"></i>
      </label>
      <label for="profile">
        <i class="fa-solid fa-user"></i>
      </label>
      <label for="likes">
        <i class="fa-solid fa-heart"></i>
      </label>
      <label for="settings">
        <i class="fa-sharp fa-solid fa-gear"></i>
      </label>
      <label for="notifications">
        <i class="fa-solid fa-bell"></i>
      </label>
      <!-- 滑块 -->
      <div class="underline"></div>
    </div>
  </div>
</body>

</html>